//
//  ApplicationController.h
//  WSPluginSwitcher
//
//  @author	Jens Krause [www.websector.de]
//	@date		01/01/09
//  @see		http://www.websector.de/blog/
//
//  Licensed under the MIT License http://www.opensource.org/licenses/mit-license.php
//

#import <Cocoa/Cocoa.h>
#import "ApplicationModel.h"
#import "PreferencesController.h"



@interface ApplicationController : NSObject {

	IBOutlet NSWindow *mainView;
	IBOutlet NSComboBox *cb_flashPlugins;	
	IBOutlet NSButton *b_switchFlashPlugin;	
	IBOutlet NSArrayController *archiveFlashPluginsFoldersController;
	IBOutlet NSProgressIndicator *loader;
	
	IBOutlet NSButton *chb_restartFirefox;
	IBOutlet NSButton *chb_restartSafari;
	
	ApplicationModel *appModel;	
	PreferencesController *prefController;
	
	BOOL flashArchivePluginsFolderDefined;

}

- (IBAction)showPreferencePanel:(id)sender;

- (IBAction)selectedArchivPluginsFolderChanged:(id)sender;
- (IBAction)switchFlashPluginHandler:(id)sender;
- (IBAction)restartFirefoxHandler:(id)sender;
- (IBAction)restartSafariHandler:(id)sender;

- (void) pluginIsSwitching:(BOOL) value;

- (BOOL) checkPermissions:(NSString *)fileName;

- (void) alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo;

- (void) restartBrowser:(NSString *) appName;

@end
